package com.young.common.context;

/**
 * @description：
 * @author: yangyahui01
 * @date: 11/29/24 2:13 PM
 */
public enum Cloud {
    AWS("aws"),
    ALI("ali"),
    TEN("ten"),
    DEFAULT("default");

    public final String code;

    private Cloud(String code) {
        this.code = code;
    }

    public static Cloud codeOf(String code) {
        Cloud[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            Cloud e = var1[var3];
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }

        return null;
    }

    public static boolean supported(String cloud) {
        return codeOf(cloud) != null;
    }
}
